package com.cet.lxf.reflection.test01;

/**
 * @program: algorithm
 * @description:
 * @author: 陈恩涛
 * @create: 2021-07-28 16:23
 **/
public class Main01 {
    public static void main(String[] args) {
        Integer n = 123;
        System.out.println(n instanceof Integer);
        System.out.println(n instanceof Number);

        System.out.println(n.getClass() == Integer.class);
        // 无法通过编译 Error:(16, 41)
        // java: 不可比较的类型: java.lang.Class<java.lang.Number>和java.lang.Class<capture#1, 共 ? extends java.lang.Integer>
        // System.out.println(Number.class == n.getClass());
        Class cls = Number.class;
        System.out.println(cls == n.getClass());
    }
}
